home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Nov 90 / MacApp.Tech$ 11⁄30⁄90 / 2431-PointerToHex()-Nov90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.4 KB  |  68 lines  |  [TEXT/GEOL]

  1. Item    1600916                         30-Nov-90        05:36PST
  2.  
  3. From:   POWERUP.ENG                     Power Up Software,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    PointerToHex()
  8.  
  9. Attn:   MacApp.Tech$
  10. SentBy: James Plamondon
  11. Date   11/29/90
  12. Subject    PointerToHex()
  13. From   James Plamondon
  14. To   MacApp.Tech$
  15.  
  16. Subject:   PointerToHex()
  17. Gentlepersons,
  18.  
  19. The UMacAppUtilities routine PointerToHex() accepts a pointer (as a longint
  20. value), a string (by reference), and a 'hexDigits' INTEGER as arguments, and
  21. returns (in the given string) the string representation of the given longint
  22. value.
  23.  
  24. That is all fine, and useful.  What I don't understand is what actual value to
  25. supply for the 'hexDigits' formal argument.
  26.  
  27. MacApp calls PointerToHex() in only five places:
  28.     CALLED FROM:                                                  hexDigits:
  29.   ptr to object?
  30.     ————————                                                 ——————   ————————
  31.     TObjectView.Draw()                                              6
  32.           Yes
  33.     TObjListView.DrawItem()                                     6
  34.       Yes
  35.     GLOBAL.GetFrameInfo()                                         8
  36.         No
  37.     TPrintHandler.GetInspectorName()                      8
  38.  Yes
  39.      GLOBAL.StdFieldToString()                                   8
  40.        No
  41.  
  42. There does not seem to be any pattern to the value supplied to hexDigits:  it
  43. is either 6 or 8, but which of those values is passed appears (to my untrained
  44. eye) to be random.
  45.  
  46. I want a GetInspectorName() override to include the value of an object
  47. reference in the resulting inspector name.  That usage parallels the example
  48. provided by TPrintHandler.GetInspectorName(), and would imply that I should
  49. pass the value 8 for hexDigits.
  50.  
  51. On the other hand, I want to have the resulting string match that displayed by
  52. the inspector in other places; that would suggest that I pass the value 6 for
  53. hexDigits, as is done by the Inspector routines Draw() and DrawItem().
  54.  
  55. Which value should I use?  And why isn't MacApp's usage more consistent?
  56.  
  57. I had expected that there would be no hexDigits argument to PointerToHex(),
  58. but that the value would be derived, inside PointerToHex(), from some
  59. indication (from Gestalt) of whether or not the application was using 32-bit
  60. addresses.  What am I missing, which explains why this is not the case?
  61.  
  62. Hoping for simple answers to these puzzling questions, I remain
  63.  
  64. Yours,
  65.  
  66. James Plamondon
  67.  
  68.